﻿using Microsoft.Extensions.DependencyInjection;
using MyK3CloudCore.IOC.Extensions;
using System.Net.Http;

namespace MyK3CloudCore.IOC;

public class K3Services
{
    public static void AddK3Sugar(K3Config config)
    {
        K3IOCServiceCollectionExtensions.Configs = config;
        var server = new ServiceCollection();
        server.AddDefaultHttpClient(K3IOCServiceCollectionExtensions._cookie);
        K3IOCServiceCollectionExtensions.HttpClientFactory = server.BuildServiceProvider().GetService<IHttpClientFactory>();
    }
}
